@extends('admin.superadmin.layout.layout')
@section('content')
<div class="row">
    <div class="col-lg-12">
            <h1 class="page-header">用户列表</h1>
        <div class="panel panel-default">
           
            
            <div class="panel-body">
                <div class="dataTable_wrapper">
                    <div id="dataTables-example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">

                    <form action="{{url('/admin/superadmin/user/index')}}" method="get">
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="dataTables_length" id="dataTables-example_length">
                            <label>显示 <select name="num" aria-controls="dataTables-example" class="form-control input-sm">
                                <option value="10">10</option>
                                <option value="25">25</option>
                                <option value="50">50</option>
                                <option value="100">100</option>
                            </select> 条</label>
                            </div>
                        </div>
                        <div class="col-sm-6">
                            <div id="dataTables-example_filter" class="dataTables_filter">

                                <label>用户名<input name="keywords"  class="form-control input-sm" placeholder="" aria-controls="dataTables-example" type="search">
                                    <button class="btn btn-primary">查询</button>
                                </label>
                            </div>
                        </div>
                    </form>
                    </div>
                   
                    <div class="row">
                         <div class="col-sm-12">
                            <table class="table table-striped table-bordered table-hover dataTable no-footer" id="dataTables-example" role="grid" aria-describedby="dataTables-example_info">
                        <thead>
                            <tr role="row">
                                <th class="sorting_asc" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" style="width: 80px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">ID</th>
                                <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">用户名</th>
                                <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending">邮箱</th>
                                <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending">账户余额</th>
                                <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">状态</th>
                                <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">操作</th></tr>
                        </thead>

                        <tbody>

                    @foreach($user as $k=>$v)
                        <tr class="gradeA odd" role="row">
                            <td class="sorting_1 sid">{{$v->id}}</td>
                            <td>{{$v->name}}</td>
                            <td>{{$v->email}}</td>
                            <td>{{$v->account}}</td>
                            <td class="center">{!! str_replace([0,1,2],['普通用户','作者','超级管理员'],$v->make) !!}</td>
                            <td class="center">
                            <a href="{{url('/admin/superadmin/user/shielding',['id'=>$v->id])}}" class="fa fa-trash-o ">屏蔽</a>
                            &nbsp;&nbsp;|&nbsp;&nbsp;
                            <a href="{{url('/admin/superadmin/user/edit',['id'=>$v->id])}}" class="fa fa-wrench">修改</a>
                            </td>
                        </tr>

                    @endforeach
                       
                        </tbody>
                    </table>
                    </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-6">
                        <div class="dataTables_info" id="dataTables-example_info" role="status" aria-live="polite"></div>
                        </div>
                      
                       
                       {!! $user->appends($request)->render() !!}
                    </div>    
                </div>
                <!-- /.panel-body -->
            </div>
            <!-- /.panel -->
        </div>
        <!-- /.col-lg-12 -->
    </div>    
  
@endsection

